Details about
Fireworks Pop-up Menu code for FrontPage
Product:
Fireworks
Platform:
All
Versions:
MX
ID:
16635
While Macromedia Fireworks MX easily generates code for FrontPage
users, it is handy for developers to understand the code Fireworks writes
and the location of that code within the HTML file.
This TechNote
discusses the code exported from Fireworks for use in FrontPage
specifically for Pop-up Menus. Developers who have different behaviors in
their files should still find this TechNote useful. This TechNote is
intended for FrontPage developers needing to check their code, needing to
copy the appropriate lines of code to FrontPage documents, and needing to
solve problems that may occur.
Identifying the code Fireworks creates for Pop-up
Menus Fireworks Pop-up Menus are complicated behaviors, and
the behaviors require a fair amount of code. The resulting code includes
three or four separate <script> tags, as well as the HTML code for
the table structure.
The
<script> tag containing the path to the external JavaScript
file
The single-line <script> tag used to describe the path
to the external JavaScript file appears shortly after the
<meta> tags. This line of code (displayed below) must include
the correct path to the external JavaScript file that Fireworks
exports in order for the Pop-up Menus to work.
The
<script> tag containing the function code for the Pop-up
Menus
The code referenced in the first bullet should be followed by
a much larger <script> area, containing all JavaScript
functions listed with their associated code. This <script> tag
will hold the Pop-up Menu function code (displayed below), but it
may also hold additional behavior functions if your Fireworks file
uses them. For example, you might see code for swap image behaviors
if your file has buttons.
The
<script> tag that calls the functions for the Pop-up
Menus
This single line of code is located just after the
<body> tag, as shown below. Without this line of code, the
mmLoadMenus function—described in the <script> tag referenced
in the second bullet—will never be activated.
Note: The code
contained in the bullets above will need to be copied from the
Fireworks HTML document to the FrontPage HTML document. This
procedure is described in Exporting
and inserting Fireworks HTML into FrontPage (TechNote
16633)
The <table> tag that includes any images that make
up your Fireworks file
All of the slices and buttons created in Fireworks will be
exported as individual image files, and the paths to these image
files will be written in HTML. These images will be oragnized in a
table tag (which allows images to be placed on the page in precise
locations). This table tag—found between the <body> and
</body> tags and illustrated below—holds most of the HTML code
for the page that you exported from Fireworks. Also illustrated
below, image maps coded from any hotspots you created in Fireworks
will also be written to this table code.
(Optional) The
<script> tag that lists the images to be preloaded
This tag will only be written if your file contains buttons
or other images that use a swap image or nav bar behavior.
As shown in the illustration for the table code, any images
that are to be preloaded will be listed within a script tag located
immediately within the table tag. If your Fireworks file does not
contain any buttons or rollover behaviors, this fourth script tag
will not be present.
Additional information The following TechNotes
are written for FrontPage users. These TechNotes will be most useful for
readers if consulted in the order listed.